package p3;

import java.util.Scanner;

/**
 * @author krystal
 * @date 2022/11/9 20:40
 */
public class Demo14 {
    public static void main(String[] args) {
        Scanner scanner=new Scanner(System.in);
        int value = scanner.nextInt();
        int count = 0;
        while(value != 0)
        {
            if(value % 2 == 1)
                count++;
            value /= 2;
        }
        System.out.println(count);

    }
}
